﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MyNeedBackTelRecordMasterList.aspx.cs" Inherits="YWTSSys.Web.MachineSys.YWTSWeb.yw.MyNeedBackTelRecordMasterList" %>
<%--需要回访的用户--%>
<div class="pageContent" style="padding:5px;">		   
        <table width="100%" border="0" cellpadding="0" cellspacing="0" >
            <tr>
                <td colspan="2" style="">
                    <div style="border:solid 1px #CCC;  background:#fff; margin-bottom:5px; line-height:20px; padding:0px 5px; color:Red;">提示：只显示需回访时间小于等于今天的记录</div>
                </td>
            </tr>
            <tr>                
                <td   valign="top"> 
                                     
                        <div layoutH="42" style="border:solid 1px #CCC;  background:#fff"> 
		                    
                                <form id="pagerForm" method="post" action="YWTSWeb/yw/MyNeedBackTelRecordMasterList.aspx" onsubmit="return navTabSearch(this);" >
                                    <input type="hidden" name="orderField" value="<%=orderField %>" />
                                    <input type="hidden" name="orderDirection" value="<%=orderDirection %>" />
                                    <input type="hidden" name="pageNum" value="1" />
                                    <input type="hidden" name="numPerPage" value="<%=numPerPage %>" />                                    
                                </form>
                            
                            <div class="pageContent"  > 
                                <table class="table" width="100%" layoutH="75">
                                    <thead>
                                        <tr  > 
                                             <th width="90px"  >客户</th>
                                             <th width="90px" >电话</th>
                                             <th width="100px" >上次通话时间</th>
                                              <th width="100px">应回访时间</th>
                                             <th width="80px" >业务员</th>
                                             <th width="80px" >分组</th>
                                            
                                        </tr>
                                    </thead>                
                                    <asp:repeater id="rpTelMenu" runat="server">
                                        <HeaderTemplate>   
                                        <tbody>   
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <tr  onclick="MyNeedBackTelRecordMasterList_ShowHistry(<%# Eval("ID") %>,<%# Eval("客户ID") %>)"    >               
                                                 <td><%# Eval("客户名称")%></td> 
                                                 <td><%# Eval("手机号码")%></td>
				                                 <td><%# Eval("通话时间")%></td>
                                                  <td><%# Eval("需回访时间")%></td>
				                                 <td><%# Eval("RealName")%></td>
                                                 <td><%# Eval("分组标志")%></td>
                                                
			                                </tr>
                                        </ItemTemplate>
                                        <FooterTemplate>
                                            </tbody>                         
                                        </FooterTemplate>
                                    </asp:repeater>
                                </table>   
                                                
                            </div>
                        </div>
                    
                </td>
                <td valign="top"   style=" padding-left:5px;   background:#fff;width:300px;" >
                         <div layoutH="0"  >                        
                             <div  layoutH="350"  id="MyNeedBackTelRecordMasterList_TelRecordDetail" style=" border-width:1px ; border-style:solid; border-color: #CCC; line-height:21px; ">
                                查看通话明细
                             </div>
                             <a  href="YWTSWeb/yw/AddTelRecord.aspx?customerid==0" style="display:none;" target="ajax" rel="MyCustomerMasterList_TelRecordDetail"  defautloadajax="true">相关客户消费及电话列表</a>
                             <div id="MyNeedBackTelRecordMasterList_AddTelRecord" style="height:300px;border:solid 1px #CCC; background:#fff; margin-top:5px;">
                                  本次通话记录
                             </div>
                        </div>
                          
                </td>
            </tr>
        </table>	
</div>

<script type="text/javascript" >
    function MyNeedBackTelRecordMasterList_ShowHistry(_telid, _CustomerId) {

        //2.加载本次通话页
        rel = "MyNeedBackTelRecordMasterList_AddTelRecord";
        href = "YWTSWeb/yw/AddTelRecord.aspx?customerid=" + _CustomerId + "&ParTelID=" + _telid;
        if (rel) {
            var $rel = $("#" + rel);
            $rel.loadUrl(href, {}, function () {
                $rel.find("[layoutH]").layoutH();
            });
        }

        //3.显示通话及消费记录
        rel = "MyNeedBackTelRecordMasterList_TelRecordDetail";
        href = "YWTSWeb/yw/TelRecordDetail.aspx?telid=" + _telid;
        if (rel) {
            var $rel = $("#" + rel);
            $rel.loadUrl(href, {}, function () {
                $rel.find("[layoutH]").layoutH();
            });
        }
    }
</script>